/**
 * 
 */
package pl.edu.agh.to;

import java.util.ArrayList;
import java.util.List;

/**
 * @author karulis
 * 
 */
public class Rate {
	static List<Rate> rates = new ArrayList<Rate>();
	static {
		rates.add(new Rate(2.0));
		rates.add(new Rate(2.5));
		rates.add(new Rate(3.0));
		rates.add(new Rate(3.5));
		rates.add(new Rate(4.0));
		rates.add(new Rate(4.5));
		rates.add(new Rate(5.0));
	}

	String rowId;

	private final Double rate;

	Rate(Double rate) {

		this.rate = rate;
	}

	Rate(Double rate, String rowId) {
		this(rate);
		this.rowId = rowId;
	}

	@Override
	public String toString() {
		return String.valueOf(rate);
	}

	static List<Object> ratesList() {
		List<Object> list = new ArrayList<Object>();
		for (Rate rate : rates) {
			list.add(rate);
		}
		return list;
	}

	String getRowId() {
		return rowId;
	}
}
